#pragma once

class CColor
{
public:
	double r;
	double g;
	double b;

	CColor(double _r,double _g,double _b){r=_r;g=_g;b=_b;};
	CColor(){r=0.0;g=0.0;b=0.0;};

	CColor operator+( const CColor &rhs ) const {
		return CColor( r+rhs.r, g+rhs.g, b+rhs.b);
	}

	CColor operator+=( const CColor &rhs ){
		return CColor( r+=rhs.r, g+=rhs.g, b+=rhs.b);
	}

	CColor operator-( const CColor &rhs ) const {
		return CColor( r-rhs.r, g-rhs.g, b-rhs.b);
	}

	CColor operator-=( const CColor &rhs ){
		return CColor( r-=rhs.r, g-=rhs.g, b-=rhs.b);
	}

	CColor operator*( const CColor &rhs ) const {
		return CColor( r*rhs.r, g*rhs.g, b*rhs.b);
	}

	CColor operator*=( const CColor &rhs ){
		return CColor( r*=rhs.r, g*=rhs.g, b*=rhs.b);
	}

	CColor operator*( const double &rhs ) const {
		return CColor( r*rhs, g*rhs, b*rhs);
	}

	CColor operator*=( const double &rhs ){
		return CColor( r*=rhs, g*=rhs, b*=rhs);
	}

	CColor operator/( const double &rhs ) const {
		return CColor( r/rhs, g/rhs, b/rhs);
	}

	CColor operator/=( const double &rhs ) {
		return CColor( r/=rhs, g/=rhs, b/=rhs);
	}

	CColor operator/=( const CColor &rhs ){
		return CColor( r/=rhs.r, g/=rhs.g, b/=rhs.b);
	}

};

class CByteColor
{
public:
	unsigned int r;
	unsigned int g;
	unsigned int b;

	CByteColor(double _r,double _g, double _b);
	unsigned int RGB();
};
